import request from "./request.js";
import config from "../config.js";

const baseUrl = config.api[0].baseUrl

//获取公钥
export function getKey() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/common/public-key",
    method: "get"
  });
}

//登陆
export function login(params) {
  return request({
    url: baseUrl + "/opsli-boot/system/login",
    method: "post",
    data: params
  });
}

//字典查询
export function findListByTypeCode(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/system/dict/detail/findListByTypeCode?typeCode=" + params,
    method: "get",
  });
}

//房源字典列表
export function getDropdownBoxData() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/getDropdownBoxData",
    method: "get",
  });
}

//房源查找
export function findPageByParam(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/findPageByParam",
    method: "get",
    params: params
  });
}

//保存搜索
export function searchInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/search/insert",
    method: "post",
    data: params
  });
}

//获取搜索数据
export function searchFindPage(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/search/findPage",
    method: "get",
    params: params
  });
}

//删除快速搜索
export function searchDel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/search/del",
    method: "post",
    params: params
  });
}

//获取新增房源字典列表
export function getInsertDropdownData() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/getInsertDropdownData",
    method: "get",
  });
}

//新增房源数据
export function houseInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/insert",
    method: "post",
    data: params
  });
}

//小区查询
export function communityFindAll() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/community/findAll",
    method: "get"
  });
}

//获取区域列表
export function areaFindTreeAll() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/area/findTreeAll",
    method: "get"
  });
}

//获取范围列表
export function orgTreeByCurrUser() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/system/org/orgTreeByCurrUser",
    method: "get"
  });
}

//获取范围列表不带用户
export function orgTreeNoUser() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/system/org/orgTree",
    method: "get"
  });
}

//获取房源基本信息
export function findHouseBaseById(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/findHouseBaseById",
    method: "get",
    params: params
  });
}

//获取房源获客官网信息
export function findByHouseId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/official/findByHouseId",
    method: "get",
    params: params
  });
}
export function findByNewHouseId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/official/findByNewHouseId",
    method: "get",
    params: params
  });
}
export function findByCommunityId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/official/findByCommunityId",
    method: "get",
    params: params
  });
}

//获取房源跟进
export function findPageByHouseId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/follow/findPageByHouseId",
    method: "get",
    params: params
  });
}

//获取房源关联员工角色
export function findUserByHouseId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/role/findUserByHouseId",
    method: "get",
    params: params
  });
}

//查看门牌号
export function lookDoorPlate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/lookDoorPlate",
    method: "get",
    params: params
  });
}

//获取新增客源的下拉框数据
export function getInsertDropdownData2() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/getInsertDropdownData",
    method: "get"
  });
}

//新增客源数据
export function customerInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/insert",
    method: "post",
    data: params
  });
}


//获取查询客源的下拉框数据
export function getDropdownBoxData2(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/getDropdownBoxData",
    method: "get",
    data: params
  });
}

//查询客源列表
export function findPageByParam2(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/findPageByParam",
    method: "get",
    params: params
  });
}

//获取新增小区下拉框数据
export function getDropdownBoxData3() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/community/getInsertDropdownData",
    method: "get",
  });
}

//新增小区数据
export function communityInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/community/insert",
    method: "post",
    data: params
  });
}

//获取某级的区域列表
export function getLevelAreaList(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/area/getLevelAreaList",
    method: "get",
    params: params
  });
}

//获取单条区域信息
export function getArea(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/area/get",
    method: "get",
    params: params
  });
}

//获取小区查询页面下拉框数据字典
export function getDropdownBoxData4(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/community/getDropdownBoxData",
    method: "get",
    params: params
  });
}


//分页查询获取小区数据列表
export function communityFindPage(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/community/findPage",
    method: "get",
    params: params
  });
}

//查看业主信息
export function lookOwnerInfo(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/lookOwnerInfo",
    method: "get",
    params: params
  });
}

//查看底价
export function lookBasePrice(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/lookBasePrice",
    method: "get",
    params: params
  });
}

//查看客户信息
export function lookCustomerInfo(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/lookCustomerInfo",
    method: "get",
    params: params
  });
}

//根据id查询客源
export function customerFindById(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/findById",
    method: "get",
    params: params
  });
}

//根据id获取客源跟进
export function findPageByCustomerId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/follow/findPageByCustomerId",
    method: "get",
    params: params
  });
}

//根据id获取客源关联角色
export function findUserByCustomerId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customerrole/findUserByCustomerId",
    method: "get",
    params: params
  });
}


//根据id获取房源带看记录
export function leadByHouseId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/lead/findPageByHouseId",
    method: "get",
    params: params
  });
}


//根据id获取客源带看记录
export function leadByCustomerId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/lead/findPageByCustomerId",
    method: "get",
    params: params
  });
}

//设置置顶
export function changeTop(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/follow/changeTop",
    method: "get",
    params: params
  });
}

//小区详情
export function communityFindDetails(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/community/findDetails",
    method: "get",
    params: params
  });
}

//调整价格
export function houseChangePrice(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/changePrice",
    method: "post",
    data: params
  });
}

//房源动态
export function trendsFindPage(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/trends/findPage",
    method: "get",
    params: params
  });
}


//新增地域
export function areaInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/area/insert",
    method: "post",
    data: params
  });
}

//修改地域
export function areaUpdate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/area/update",
    method: "post",
    data: params
  });
}

//删除地域
export function areaDel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/area/del",
    method: "post",
    params: params
  });
}

//图片查询
export function findPictureByHouseId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/picture/findPictureByRefId",
    method: "get",
    params: params
  });
}

//图片修改
export function batchUpdate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/picture/batchUpdate",
    method: "post",
    data: params
  });
}


//上传图片地址数据到房源
export function batchInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/picture/batchInsert",
    method: "post",
    data: params
  });
}

//删除图片地址数据房源
export function pictureDelAll(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/picture/delAll",
    method: "post",
    params: params
  });
}


//上传图片
export function fileUpload(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/file/upload",
    method: "post",
    data: params
  });
}

//获取岗位列表
export function jobList(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/job/list",
    method: "get",
    params: params
  });
}

//新增岗位
export function jobInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/job/insert",
    method: "post",
    data: params
  });
}

//删除岗位
export function jobDel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/job/del",
    method: "post",
    params: params
  });
}

// //查询小区图片视频信息
// export function communityimageFindList(params) {
//   return request({
//     url: baseUrl + "/opsli-boot/api/v1/house/communityimage/findList",
//     method: "get",
//     params:params
//   });
// }

// //上传图片地址数据到房源
// export function communityimageInsert(params) {
//   return request({
//     url: baseUrl + "/opsli-boot/api/v1/house/communityimage/insert",
//     method: "post",
//     data:params
//   });
// }

// //删除图片地址数据房源
// export function communityimageDelAll(params) {
//   return request({
//     url: baseUrl + "/opsli-boot/api/v1/house/communityimage/delAll",
//     method: "post",
//     params:params
//   });
// }


//获取部门管理树
export function orgOrgTree(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/system/org/orgTree",
    method: "get",
    params: params
  });
}

//获取编辑获客官网
export function officialUpdate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/official/update",
    method: "post",
    data: params
  });
}

//新增获客官网
export function officialInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/official/insert",
    method: "post",
    data: params
  });
}

//查询新房
export function newsFindDetailById(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/news/findDetailById",
    method: "get",
    params: params
  });
}

//查询新房获客官网
export function officialNewHouse(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/official/findByNewHouseId",
    method: "get",
    params: params
  });
}

//删除户型
export function modelDel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/model/del",
    method: "post",
    params: params
  });
}

//新增户型
export function modelInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/model/insert",
    method: "post",
    data: params
  });
}

//获取户型
export function modelList(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/model/list",
    method: "get",
    params: params
  });
}

//修改户型
export function modelUpdate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/model/update",
    method: "post",
    data: params
  });
}

//新增组织机构
export function orgAdd(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/system/org/add",
    method: "post",
    data: params
  });
}


//删除组织机构
export function orgNewDel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/system/org/newDel",
    method: "post",
    params: params
  });
}

//修改组织机构
export function orgNewUpdate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/system/org/newUpdate",
    method: "post",
    data: params
  });
}

//获取委托
export function entrustGet(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/entrust/findEntrustByHouseId",
    method: "get",
    params: params
  });
}

//新增委托
export function entrustAdd(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/entrust/insert",
    method: "post",
    data: params
  });
}

//删除委托
export function entrustDel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/entrust/del",
    method: "post",
    params: params
  });
}

//修改委托
export function entrustUpdate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/entrust/update",
    method: "post",
    data: params
  });
}

//查询员工
export function getUserLikeRealName(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/system/user/getUserLikeRealName",
    method: "get",
    params: params
  });
}

//变跟房源角色
export function changeRole(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/role/changeRole",
    method: "post",
    data: params
  });
}

//变更客源角色
export function customerChangeRole(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customerrole/changeRole",
    method: "post",
    data: params
  });
}

//删除小区
export function communityDel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/community/del",
    method: "post",
    params: params
  });
}

//转移房源
export function transferHouse(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/role/transferHouse",
    method: "post",
    data: params
  });
}

//转移客源
export function transferCustomer(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customerrole/transferCustomer",
    method: "post",
    data: params
  });
}



//设置房源置顶
export function houseSetTop(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/setTop",
    method: "post",
    data: params
  });
}

//设置客源置顶
export function customerSetTop(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/setTop",
    method: "post",
    data: params
  });
}

//收藏房源
export function collectHouse(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/collectHouse",
    method: "get",
    params: params
  });
}

//取消收藏房源
export function delCollectHouse(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/delCollectHouse",
    method: "get",
    params: params
  });
}

//收藏客源
export function collectCustomer(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/collectCustomer",
    method: "get",
    params: params
  });
}

//取消收藏客源
export function delCollectCustomer(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/delCollectCustomer",
    method: "get",
    params: params
  });
}

//删除房源跟进
export function houseFollowDel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/follow/del",
    method: "post",
    params: params
  });
}

//改变房源状态
export function houseChangeDealStatus(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/changeDealStatus",
    method: "post",
    data: params
  });
}

//改变客源状态
export function customerChangeDealStatus(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/changeDealStatus",
    method: "post",
    data: params
  });
}

//改变房源盘别
export function updateFloorType(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/updateFloorType",
    method: "post",
    data: params
  });
}

//改变客别
export function updateCustomerType(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/updateCustomerType",
    method: "post",
    data: params
  });
}

//房源租售互转
export function hireSellChange(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/hireSellChange",
    method: "post",
    data: params
  });
}

//客源租购互转
export function changeRentBuy(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/changeRentBuy",
    method: "post",
    data: params
  });
}

//删除房源
export function houseDel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/del",
    method: "post",
    params: params
  });
}

//删除客源
export function customerDel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/del",
    method: "post",
    params: params
  });
}

//新增员工查询岗位下拉
export function getJobDropdownBoxData(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/getJobDropdownBoxData",
    method: "get",
    params: params
  });
}

//新增员工查询部门下拉
export function getOrgDropdownBoxData(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/getOrgDropdownBoxData",
    method: "get",
    params: params
  });
}

//获取新增员工下拉框数据
export function getEmployDrop(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/getInsertDropdownData",
    method: "get",
    params: params
  });
}

//新增员工
export function insertUser(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/insert",
    method: "post",
    data: params
  });
}

//获取员工查询下拉框数据
export function getEmploySelectDrop(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/getDropdownBoxData",
    method: "get",
    params: params
  });
}

//获取员工分页数据
export function useFindPage(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/findPage",
    method: "get",
    params: params
  });
}

//根据id查员工详情
export function useFindById(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/findById",
    method: "get",
    params: params
  });
}

//查询登录日志分页数据
export function getLoginLog(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/getLoginLog",
    method: "get",
    params: params
  });
}

//查询员工关怀分页数据
export function findByCare(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/findByCare",
    method: "get",
    params: params
  });
}

//获取员工动态分页数据
export function usertrendsFindPage(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/usertrends/findPage",
    method: "get",
    params: params
  });
}

//编辑员工
export function userUpdate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/update",
    method: "post",
    data: params
  });
}

//编辑小区
export function communityUpdate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/community/update",
    method: "post",
    data: params
  });
}

//修改客源信息
export function customerUpdate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/update",
    method: "post",
    data: params
  });
}

//获取新房
export function newsFindPageParam(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/news/findPageParam",
    method: "get",
    params: params
  });
}

//修改小区介绍
export function communityIntroduce(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/community/updateIntroduce",
    method: "post",
    data: params
  });
}

//获取新增新房下拉框数据
export function newsGetInsertDropdownData(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/news/getInsertDropdownData",
    method: "get",
    params: params
  });
}

//新增新房
export function newsInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/news/insert",
    method: "post",
    data: params
  });
}

//根据房源查询看房方式
export function findModeAndRemarkByHouseId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/view/findModeAndRemarkByHouseId",
    method: "get",
    params: params
  });
}

//修改看房方式
export function viewUpdateMethod(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/view/updateMethod",
    method: "post",
    data: params
  });
}

//上传钥匙
export function viewUpdateKey(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/view/uploadKey",
    method: "post",
    data: params
  });
}

//查看钥匙
export function viewFindKey(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/view/findKey",
    method: "get",
    params: params
  });
}

//退还钥匙
export function viewReturnKey(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/view/returnKey",
    method: "get",
    params: params
  });
}

//查看门锁密码
export function keyPassLook(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/view/keyPassLook",
    method: "get",
    params: params
  });
}

//修改新房
export function trendsUpdate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/news/update",
    method: "post",
    data: params
  });
}

//重置员工密码
export function resetPassWord(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/resetPassWord",
    method: "get",
    params: params
  });
}

//员工转正/转试用
export function userStatusChange(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/statusChange",
    method: "post",
    data: params
  });
}

//员工交接资源
export function userResourceHandover(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/resourceHandover",
    method: "post",
    data: params
  });
}

//员工离职/复职
export function userChangeDuty(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/changeDuty",
    method: "post",
    data: params
  });
}

//员工冻结/解冻
export function userChangeLock(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/changeLock",
    method: "post",
    data: params
  });
}

//员工删除
export function userDel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/del",
    method: "post",
    params: params
  });
}

//修改房源
export function houseUpdate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/update",
    method: "post",
    data: params
  });
}

//获取编辑房源某些字段的权限
export function getPermField(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/getPermField",
    method: "get",
    params: params
  });
}

//员工权限范围查询
export function userGetOrgTree(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/getOrgTree",
    method: "get",
    params: params
  });
}

//设置新房置顶
export function newsSetTop(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/news/setTop",
    method: "post",
    data: params
  });
}

//新增房源带看登记
export function leadInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/lead/insert",
    method: "post",
    data: params
  });
}

//新增客源带看登记
export function leadInsertByCustomer(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/lead/insertByCustomer",
    method: "post",
    data: params
  });
}

//获取所有房源的小区名、门牌号、id--新增带看
export function findAllTitleAndId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/findAllTitleAndId",
    method: "get",
    params: params
  });
}

//根据客户姓名或手机号模糊查询客户
export function findLikeNameOrPhone(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/findLikeNameOrPhone",
    method: "get",
    params: params
  });
}

//根据id查询新房代理
export function proxyGetByNewHouseId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/proxy/getByNewHouseId",
    method: "get",
    params: params
  });
}

//新增合作情况
export function saveOrUpdateCooperate(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/proxy/saveOrUpdateCooperate",
    method: "post",
    data: params
  });
}

//新增佣金规则
export function saveOrUpdateKickbackRule(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/proxy/saveOrUpdateKickbackRule",
    method: "post",
    data: params
  });
}

//新增代理规则
export function saveOrUpdateProxyRule(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/proxy/saveOrUpdateProxyRule",
    method: "post",
    data: params
  });
}

//根据名称搜素新房
export function newsSearchByName(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/news/searchByName",
    method: "get",
    params: params
  });
}

//新增报备记录
export function reportInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/report/insert",
    method: "post",
    data: params
  });
}

//获得报备分页数据
export function reportFindPage(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/report/findPage",
    method: "get",
    params: params
  });
}

//查看报备详情
export function reportGetDetailById(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/report/getDetailById",
    method: "get",
    params: params
  });
}

//修改报备状态记录
export function reportInsertRecord(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/reportrecord/insertRecord",
    method: "post",
    data: params
  });
}

//新房带看记录
export function findPageByNewHouseId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/lead/findPageByNewHouseId",
    method: "get",
    params: params
  });
}

//新增新房带看登记
export function insertByNewHouse(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/lead/insertByNewHouse",
    method: "post",
    data: params
  });
}

//获取新房动态
export function trendsGetByNewId(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/news/trends/getByNewId",
    method: "get",
    params: params
  });
}

//新增新房楼盘动态
export function newsTrendsInsert(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/news/trends/insert",
    method: "post",
    data: params
  });
}

//人事管理统计员工数据
export function userUserCount(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/user/userCount",
    method: "get",
    params: params
  });
}

//修改岗位级别
export function updateJobLevel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/job/update",
    method: "post",
    data: params
  });
}

//根据岗位id与权限类型获取权限列表
export function findListByJobIdAndType(jobId, type) {
  return request({
    url: baseUrl + `/opsli-boot/api/v1/house/perm/findListByJobIdAndType?jobId=${jobId}&type=${type}`,
    method: "get"
  });
}

//修改权限值
export function updatePerm(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/perm/update",
    method: "post",
    data: params
  });
}

//获取所有系统参数
export function findAllOptions() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/system/options/findAllOptions",
    method: "get"
  });
}

//修改系统参数
export function updateOptions(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/system/options/updateOptions",
    method: "post",
    data: param
  });
}

//获取房源的字典数据
export function dictHouse() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/perm/dictHouse",
    method: "get"
  });
}

//新增字典详情
export function addDict(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/perm/addDict",
    method: "post",
    data: param
  });
}

//修改字典详情
export function updateDict(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/perm/updateDict",
    method: "post",
    data: param
  });
}

//删除字典详情
export function delDict(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/perm/delDict",
    method: "post",
    data: param
  });
}

//删除字典详情失败调用此接口
export function changeDict(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/perm/changeDict",
    method: "post",
    data: param
  });
}

//获取客源的字典数据
export function dictCustomer() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/perm/dictCustomer",
    method: "get"
  });
}

//新增更进数据
export function followInsert(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/follow/insert",
    method: "post",
    data: param
  });
}

//退出登陆
// export function logout() {
//   return request({
//     url: "/opsli-boot/system/logout",
//     method: "post"
//   });
// }

//删除新房
export function newsdel(params) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/news/del",
    method: "post",
    params: params
  });
}

//合同 根据房源名称或房源编号查询房源
export function houseFindByNameOrNo(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/house/findByNameOrNo",
    method: "get",
    params: param
  });
}

//合同 根据新房名称或新房编号查询列表
export function newsFindByNameOrNo(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/news/findByNameOrNo",
    method: "get",
    params: param
  });
}

//合同 根据客户名称或客源编号查询列表
export function customerFindByNameOrNo(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/customer/findListByNameOrNo",
    method: "get",
    params: param
  });
}

//新增合同下拉框数据
export function getContractDropdownData() {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/contract/getInsertDropdownData",
    method: "get"
  });
}

//新增合同数据
export function contractInsert(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/contract/insert",
    method: "post",
    data: param
  });
}

//查询合同管理页面
export function contractFindPage(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/contract/findPage",
    method: "get",
    params: param
  });
}

//新增交易模版
export function addDealTemplate(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/deal/addTemplate",
    method: "post",
    data: param
  });
}

//编辑交易模版
export function editDealTemplate(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/deal/editTemplate",
    method: "post",
    data: param
  });
}

//查询交易模版
export function findTemplateList(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/deal/findTemplateList",
    method: "get",
    params: param
  });
}

//根据id查询交易模版详情
export function findDealStepsByTemplateId(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/deal/findDealStepsByTemplateId",
    method: "get",
    params: param
  });
}

//根据id删除交易模版
export function delTemplateById(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/deal/delTemplateById",
    method: "post",
    params: param
  });
}

//根据id获取合同详情
export function findDetailById(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/contract/findDetailById",
    method: "get",
    params: param
  });
}

//添加交易流程
export function dealAddPlan(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/deal/addPlan",
    method: "post",
    data: param
  });
}

//查询交易进度
export function findPlanByContractId(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/deal/findPlanByContractId",
    method: "get",
    params: param
  });
}

//更换交易流程
export function changeProcess(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/deal/changeProcess",
    method: "post",
    data: param
  });
}

//编辑交易流程
export function updateSteps(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/deal/updateSteps",
    method: "post",
    data: param
  });
}

//完成或编辑交易进度
export function completeStep(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/deal/completeStep",
    method: "post",
    data: param
  });
}

//查看应收科目管理下拉数据
export function subjectFindListType(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/must/subject/findListByType",
    method: "get",
    params: param
  });
}

//新增应收管理
export function mustManage(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/must/manage",
    method: "post",
    data: param
  });
}

//根据合同id查询应收管理列表
export function findMustByContractId(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/must/findListByContractId",
    method: "get",
    params: param
  });
}

//根据合同id分页查询实收记录
export function findPageByPaidIn(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/realpay/findPageByContractId",
    method: "get",
    params: param
  });
}

//新增实收下拉框数据
export function findSubjectListByContractId(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/must/findSubjectListByContractId",
    method: "get",
    params: param
  });
}

//新增实收管理
export function realpayInsert(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/realpay/insert",
    method: "post",
    data: param
  });
}

//修改实收数据
export function realpayUpdate(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/realpay/update",
    method: "post",
    data: param
  });
}

//删除实收数据
export function realpayDel(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/{ver}/house/realpay/del",
    method: "post",
    params: param
  });
}

//查询合同下拉框数据
export function getContractManageDrop(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/contract/getDropdownBoxData",
    method: "get",
    params: param
  });
}

//交易进度查询列表
export function findPageByPlan(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/contract/findPageByPlan",
    method: "get",
    params: param
  });
}

//交易进度查询下拉框数据
export function getPlanDropdownBoxData(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/contract/getPlanDropdownBoxData",
    method: "get",
    params: param
  });
}

//收款记录下拉框查询
export function getRealRecordsDropData(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/realpay/getRealRecordsDropdownBoxData",
    method: "get",
    params: param
  });
}

//收款记录查询
export function queryTransactionRecords(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/realpay/queryTransactionRecords",
    method: "get",
    params: param
  });
}

//新增门店费用
export function orgCostAdd(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/orgCost/add",
    method: "post",
    data: param
  });
}

//获取门店费用下拉框
export function orgCostAddGetDropd(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/orgCost/getDropdownBoxData",
    method: "get",
    params: param
  });
}

//根据部门级别查询列表数据
export function findListByLevel(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/system/org/findListByLevel",
    method: "get",
    params: param
  });
}

//查询门店费用
export function orgCostFindPage(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/orgCost/findPage",
    method: "get",
    params: param
  });
}

//修改门店费用
export function orgCostUpdate(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/orgCost/update",
    method: "post",
    data: param
  });
}

//删除门店费用
export function orgCostDel(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/orgCost/del",
    method: "post",
    params: param
  });
}

//撤销门店费用审核
export function cancelExamine(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/orgCost/cancelExamine",
    method: "post",
    params: param
  });
}

//门店费用审核
export function orgCostExamine(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/orgCost/examine",
    method: "post",
    params: param
  });
}





//分页查询员工奖惩记录
export function userRewardFindPage(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/userReward/findPage",
    method: "get",
    params: param
  });
}

//获取员工奖惩下拉框
export function userRewardGetDrop(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/userReward/getDropdownBoxData",
    method: "get",
    params: param
  });
}

//删除员工奖惩
export function userRewardDel(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/userReward/del",
    method: "post",
    params: param
  });
}

//撤销员工奖惩审核
export function userRewardcancel(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/userReward/cancelExamine",
    method: "post",
    params: param
  });
}

//员工奖惩审核
export function userRewardExamine(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/userReward/examine",
    method: "post",
    params: param
  });
}

//新增员工奖惩
export function userRewardAdd(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/userReward/add",
    method: "post",
    data: param
  });
}

//修改员工奖惩
export function userRewardupdate(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/userReward/update",
    method: "post",
    data: param
  });
}

//业绩分配，角色下拉框数据
export function getRoleAndUserMap(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/meritShare/getRoleAndUserMap",
    method: "get",
    params: param
  });
}

//业绩分配列表查询
export function meritShareFindList(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/meritShare/findListByContractId",
    method: "get",
    params: param
  });
}

//业绩分配
export function meritShareDistribute(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/meritShare/distribute",
    method: "post",
    data: param
  });
}

//薪资管理分页查询
export function salaryManageFindPage(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/salaryManage/findPage",
    method: "get",
    params: param
  });
}

//薪资生成
export function salaryManageGenerate(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/salaryManage/generate",
    method: "post",
    params: param
  });
}

//审核薪资
export function salaryManageReview(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/salaryManage/review",
    method: "post",
    params: param
  });
}

//财务核算
export function accountsFindPage(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/accounts/findPage",
    method: "get",
    params: param
  });
}

//根据岗位id分页查询薪资配置列表
export function salaryConfigFindPage(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/salaryConfig/findPage",
    method: "get",
    params: param
  });
}

//修改薪资配置
export function salaryConfigUpdate(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/salaryConfig/update",
    method: "post",
    data: param
  });
}

//查询提成方案列表
export function moneyPlanFindList(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/moneyPlan/findList",
    method: "get",
    params: param
  });
}

//新增提成方案
export function moneyPlanAdd(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/moneyPlan/add",
    method: "post",
    data: param
  });
}

//新增应收科目数据
export function subjectInsert(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/must/subject/insert",
    method: "post",
    data: param
  });
}

//修改应收科目数据
export function subjectUpdate(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/must/subject/update",
    method: "post",
    data: param
  });
}

//删除应收科目数据
export function subjectDel(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/must/subject/del",
    method: "post",
    params: param
  });
}

//新增科目管理费数据
export function costInsert(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/must/cost/insert",
    method: "post",
    data: param
  });
}

//修改科目管理费数据
export function costUpdate(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/must/cost/update",
    method: "post",
    data: param
  });
}

//删除科目管理费数据
export function costDel(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/must/cost/del",
    method: "post",
    params: param
  });
}

//交易合同查询总数
export function contractCount(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/contract/querytypecount",
    method: "get",
    params: param
  });
}

//财务数据统计
export function financeCount(param) {
  return request({
    url: baseUrl + "/opsli-boot/api/v1/house/finance/orgCost/financeCount",
    method: "get",
    params: param
  });
}